package cn.pxs.service;

import cn.pxs.dao.TypeDao;
import cn.pxs.entity.Type;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TypeServiceImpl implements TypeService {
    @Autowired
    TypeDao dao;

    @Override
    public Type findById(String id) {
        return dao.findById(id);
    }

    @Override
    public List<Type> findAll() {
        return dao.findAll();
    }

    @Override
    public Type add(Type type) {
        Type t = dao.add(type);
        return t;
    }

    @Override
    public void delById(String id) {
        dao.delById(id);
    }
}
